﻿using System;
using System.Collections.Generic;
using System.Linq;
using XcoAppSpaces.Core;

namespace testServer.XcoAppSpaces.Core
{
	class Program
	{
		static void Main(string[] args)
		{
			Console.WriteLine("Xco Application Space - Client/Server Demo");
			try
			{
               using (XcoAppSpace space = XcoAppSpace.ConfigureWithConfigString("tcp.port=8000;tcp.key=testPass123"))
				{
					space.RunWorker<PCompactWorker, CompactWorker>("myworker");
					Console.WriteLine("Server running at port 8000. Press any key to stop.");
					Console.ReadLine();
				}
			}
			catch (Exception ex)
			{
				Console.WriteLine("ERROR: " + ex.Message);
				Console.ReadLine();
			}
		}
	}
}
